package com.diapoclic.entity;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Set;


/**
 * The persistent class for the Document database table.
 * 
 */
@Entity
public class Document implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="id_doc")
	private int idDoc;

    @Lob()
	private String comment;

	@Column(name="date_add")
	private String dateAdd;

	@Column(name="name_doc")
	private String nameDoc;

	private String path;

	private int size;

	private String type;

	//bi-directional many-to-one association to User
    @ManyToOne
	@JoinColumn(name="id_user")
	private User user;

	//bi-directional many-to-many association to Folder
	@ManyToMany(mappedBy="documents")
	private Set<Folder> folders;

    public Document() {
    }

	public int getIdDoc() {
		return this.idDoc;
	}

	public void setIdDoc(int idDoc) {
		this.idDoc = idDoc;
	}

	public String getComment() {
		return this.comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public String getDateAdd() {
		return this.dateAdd;
	}

	public void setDateAdd(String dateAdd) {
		this.dateAdd = dateAdd;
	}

	public String getNameDoc() {
		return this.nameDoc;
	}

	public void setNameDoc(String nameDoc) {
		this.nameDoc = nameDoc;
	}

	public String getPath() {
		return this.path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public int getSize() {
		return this.size;
	}

	public void setSize(int size) {
		this.size = size;
	}

	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	public Set<Folder> getFolders() {
		return this.folders;
	}

	public void setFolders(Set<Folder> folders) {
		this.folders = folders;
	}
	
}